<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, shrink-to-fit=no"/>
    <title>地铁图展示</title>
    <script type="text/javascript" src="http://webapi.amap.com/subway?v=1.0&amp;key=a71de92e1317a780613261116ac32442&amp;callback=cbk"></script>
    <style type="text/css">
        #mysubway{height:100%}
    </style>
</head>
<body>
<div id="mysubway"></div>

<script type="text/javascript">
    //开启easy模式, 直接完成地铁图基本功能, 无需自己写交互
    window.cbk = function() {
        var mySubway = subway("mysubway", {
            adcode: 4401,
            theme: "normal",
            client: 0,
            doubleclick: {
                switch: false
            }
        });
        mySubway.event.on("subway.complete", function () {
            //着重显示故障线路
            mySubway.showLine("1号线");
            //显示故障地铁站
            mySubway.addMarker("西门口",{
                width:50,
                height:50,
                offset:{x:10,y:40},
                cnt:'<img src="${ctxPath}/static/img/red.png" width="25" height="25" />',
            });
            //定义接驳的车站点
            var stationList = new Array();
            mySubway.event.on('station.touch',function(){
                console.log(arguments[1].id);
                stationList.push(arguments[1].id);
                mySubway.addMarker(arguments[1].id,{
                    width:50,
                    height:50,
                    offset:{x:15,y:32},
                    cnt:'<img src="${ctxPath}/static/img/marker_blue_sprite.png" width="40" height="20" />',
                });
            });
        });

    }
</script>
</body>
<script src="${ctxPath}/static/modular/bus/publicBusHub/publicBusFeederRoute.js"></script>
<script src="${ctxPath}/static/js/maplushu.js"></script>
</html>